package com.service.device;

import com.common.ErrorCodeEnum;
import com.common.emums.DataStatus;
import com.common.exception.BusinessException;
import com.common.utils.StringUtils;
import com.core.springSecurity.common.SecurityUtils;

import com.dao.secondary.device.DevicePmdWorkRecordInfoMapper;
import com.github.pagehelper.Page;
import com.model.domain.device.GetDevicePmdWorkRecordInfoDO;
import com.model.pojo.device.DevicePmdWorkRecordInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;



/**
 * @Author: zql
 * @Description: PMD设备作业记录服务
 * @Data: 2023-06-30
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class DevicePmdWorkRecordInfoService {
    private final DevicePmdWorkRecordInfoMapper devicePmdWorkRecordInfoMapper;

    public List<DevicePmdWorkRecordInfo> getPageList(GetDevicePmdWorkRecordInfoDO getDevicePmdWorkRecordInfoDO){
        PageHelper.clearPage();
        PageHelper.startPage(getDevicePmdWorkRecordInfoDO.getPage(),getDevicePmdWorkRecordInfoDO.getPageSize(),getDevicePmdWorkRecordInfoDO.getSortRow()+getDevicePmdWorkRecordInfoDO.getSortOrder());
        return devicePmdWorkRecordInfoMapper.selectList(getDevicePmdWorkRecordInfoDO);
    }
}
